package com.carhailing.system.schedule;

import com.carhailing.common.domain.CouponActive;
import com.carhailing.system.constant.RedisKeyContents;
import com.carhailing.system.service.CouponActiveService;
import lombok.extern.log4j.Log4j2;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName CouponActivceUp
 * @Description 优惠卷活动上架
 * @Author junyi.wang
 * @Date 2024/8/1 10:43
 */
@Log4j2
@Component
public class CouponActivceUp {
    @Autowired
    private CouponActiveService couponActiveService;
//    @Scheduled(cron = "*/10 * * * * ?")
    public void ActivceUp() {
       log.info("活动开启 开始抢劵.....");
       //获取三天优惠卷活动
         List<CouponActive> couponActives = couponActiveService.CouponActiveList();
         log.info("---"+couponActives);

    }
}
